﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Space_X.Views
{
    /// <summary>
    /// Interaction logic for PixelViewer.xaml
    /// </summary>
    public partial class PixelViewer : Window
    {
        #region Constructior
        /// <summary>
        /// Pixel Viewer Constructor
        /// </summary>
        public PixelViewer()
        {
            InitializeComponent();
        }
        #endregion

        #region Methods
        /// <summary>
        /// Sets tge pixel color of the overlay
        /// </summary>
        /// <param name="color">The color RGB to set the pixel to</param>
        public void SetPixelColor(Color color)
        {
            PixelColor.Background = new SolidColorBrush(color);

            RLabel.Content = String.Format("R:{0,4}", color.R);
            GLabel.Content = String.Format("G:{0,4}", color.G);
            BLabel.Content = String.Format("B:{0,4}", color.B);
        }
        #endregion
    }
}
